<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //es5:定义数组的方式：  [] 、 new Array()
        //let arr = new Array(1,3,5)
        let arr = new Array(3)  //有歧义
        console.log(arr);

        let arr2 = Array.of(3)
        console.log(arr2);


    </script>
</head>
<body>
    <div></div>
    <div></div>
    <div></div>
    <script>
        let divs = document.getElementsByTagName('div');
        console.log(divs,'divs');
        //Array.from():将伪数组转换成真正的数组
        let arr3 = Array.from(divs);
        console.log(arr3,'arr3');

    </script>
</body>
</html>